home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: 'Freeing' storage with realloc
- Date: 18 Feb 96 03:23:55 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.824613835@rscernix>
- References: <4fv44f$p2v@news.rz.uni-passau.de> <Pine.SV4.3.91-heb-2.04.960216145519.1012B-100000@cs.technion.ac.il>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <Pine.SV4.3.91-heb-2.04.960216145519.1012B-100000@cs.technion.ac.il> Kohn Emil Dan <emild@cs.technion.ac.il> writes:
-
- >Yes, realloc() is freeing the 100 bytes, before reallocating 13 bytes to buf.
-
- How do you know? It could resize the block to 13 (or more) bytes and
- free the rest of the original block. That's in perfect agreement with
- the standard, just like your scenario.
-
- >Hope this helps.
-
- Does it?
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-